<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
  export default {
    name: 'app',

    created() {
      let loginInfo = JSON.parse(localStorage.getItem("lishizhenLogin"));
      let time = new Date().getTime();
      if (loginInfo.info && time - loginInfo.time < 3600000) {
        this.$store.dispatch("loginInfo", true);
        this.$router.push({name: "默认"});
      } else {
        localStorage.setItem("lishizhenLogin", "");
      }
    },
    mounted() {
      if (!this.logger) this.logger = new Logger();
      this.$nextTick(() => this.logger.info("about is ready!"));
    }
  };
</script>

<style lang="less">
  body {
    margin: 0;
  }

  body::-webkit-scrollbar {
    display: none;
  }

  * {
    font-family: "Arial", "Microsoft YaHei", "黑体", "宋体", sans-serif;
    text-decoration: none;
  }
</style>
